package com.senthink.gl.business.domain.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.senthink.gl.business.common.entity.BornableEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.util.Date;

/**
 * 民众-防疫信息
 *
 * @author zooqi@senthink.com
 * @date 2017/11/28
 */
@Entity
@Table(name = "gl_people_epi")
@Getter
@Setter
public class PeopleEpi extends BornableEntity<Long> {


    /**
     * 唯一id
     */
    @Column(name = "peid", nullable = false)
    private String peid;

    /**
     *正常
     * 居家隔离
     * 集中隔离
     */
    @Column(name = "status", nullable = false)
    private String status;

    /**
     * 开始隔离时间
     */
    @Column(name = "start_time")
    private String startTime;

    /**
     * 最近核酸检测时间
     */
    @Column(name = "check_last_time")
    private String checkLastTime;

    /**
     * 核酸检测结果
     */
    @Column(name = "check_status")
    private String checkStatus;

    /**
     * 疫苗接种情况
     */
    @Column(name = "vaccination")
    private String vaccination;


    /**
     * 居住类型  本地  其他
     */
    @Column(name = "back_type")
    private String backType;

    /**
     * 省
     */
    @Column(name = "province")
    private String province;

    /**
     * 市
     */
    @Column(name = "city")
    private String city;

    /**
     * 详细地址
     */
    @Column(name = "address", nullable = false)
    private String address;

    /**
     * 最后更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "last_modified_time")
    private Date lastModifiedTime;

    @ManyToOne(targetEntity = People.class)
    @JoinColumn(name = "people", referencedColumnName = "id")
    private People people;
}
